/* Author:Carlos Andrés Reyes - 13 de mayo de 2012

*/
/*$(function(){
	var $scroller = $("#scrollin");
	$scroller.vTicker('init', {height: 70, showItems: 1});
	
	
});

$(function(){
			$('#slides').slides({
				preload: true,
				preloadImage: 'img/loading.gif',
				play: 5000,
				pause: 2500,
				hoverPause: true
			});
		});
*/

$(document).ready(function() { 
	
	$("article tbody tr:odd").css('background-color','#e7f6fc');
	
	$("#slider").easySlider({
			controlsBefore:	'<p id="controls">',
			controlsAfter:	'</p>',
			auto: true,
			pause: 200, 
			continuous: true
		});

	$("ul.sf-menu").superfish({
	            delay:       200,
	            speed:       'fast',
	            autoArrows:  false,
	            dropShadows: false
	        });
	      $('#rotate').cycle({
            fx:          'fade',
            speed:       1000,
            timeout:     200,
        	});
		  $("#tip4").click(function() {
			$.fancybox({
				'padding'		: 0,				
				'autoScale'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'title'			: this.title,
				'overlayColor':	 '#000',
				'overlayOpacity':0.5,
				'width'			: 680,
				'height'		: 495,
				'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
				'type'			: 'swf',
				'swf'			: {
				   	 'wmode'		: 'transparent',
					'allowfullscreen'	: 'true'
				}
			});
	return false;
	    }); 
	
});

$(document).ready(function() {
	 
	//ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)
	$('.accordionButton, .accordionText' ).click(function() {

		//REMOVE THE ON CLASS FROM ALL BUTTONS
		$('.accordionButton, .accordionText').removeClass('on');
		  
		//NO MATTER WHAT WE CLOSE ALL OPEN SLIDES
	 	$('.accordionContent').slideUp('normal');
   
		//IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT
		if($(this).next().is(':hidden') == true) {
			
			//ADD THE ON CLASS TO THE BUTTON
			$(this).addClass('on');
			  
			//OPEN THE SLIDE
			$(this).next().slideDown('normal');
		 } 
		  
	 });
	  
	
	/*** REMOVE IF MOUSEOVER IS NOT REQUIRED ***/
	
	//ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER 
	$('.accordionButton').mouseover(function() {
		$(this).addClass('over');
		
	//ON MOUSEOUT REMOVE THE OVER CLASS
	}).mouseout(function() {
		$(this).removeClass('over');										
	});
	
	/*** END REMOVE IF MOUSEOVER IS NOT REQUIRED ***/
	
	
	/********************************************************************************************************************
	CLOSES ALL S ON PAGE LOAD
	********************************************************************************************************************/	
	$('.accordionContent').hide();

});

/****
------------------------------------
ticker noticias
------------------------------------
*****/




